-- GENERATED SPELL FOR [Caravan Master Tset] --


function spell0_8409(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_8409', 8279, 1)
end

function spell1_8409(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8409', 7000, 1)
end

function Sorts_8409(pUnit, Event)
local choix_sorts_8409 = math.random(0, 1)
if choix_sorts_8409 == 0 then
pUnit:RegisterEvent('spell0_8409', 1, 1)
end
if choix_sorts_8409 == 1 then
pUnit:RegisterEvent('spell1_8409', 1, 1)
end
end

function mob8409_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8409', math.random(1500, 3000), 1)
end

function mob8409_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8409_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8409_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8409, 1, 'mob8409_Action')
RegisterUnitEvent(8409, 2, 'mob8409_Leave')
RegisterUnitEvent(8409, 3, 'mob8409_Kill')
RegisterUnitEvent(8409, 4, 'mob8409_Die')
